using SG;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;

public class MainEditor: PanelBase
{
    [SerializeField]
    Button m_BtnSave;
    [SerializeField]
    Button m_BtnLoad;
    [SerializeField]
    Button m_BtnQuit;
    [SerializeField]
    FileList m_FileDialog;

    //public Button m_Menu;
    private void Start()
    {
        m_BtnLoad.onClick.AddListener(OnLoad);
        m_BtnSave.onClick.AddListener(OnSave);
        m_BtnQuit.onClick.AddListener(OnQuit);
        LogicManager.Instance().DoEnterEditor();
        //m_Menu.onClick.AddListener(OnGameMenuList);
    }
    private void OnSave()
    {
        SceneMgr.Instance().DoSave();
    }

    private void OnLoad()
    {
        m_FileDialog.DoShow();
    }
    private void OnQuit()
    {
        LogicManager.Instance().DoClose();
        UIMgr.Instance().DoOpenWindow("MainMenu");
        DoClose();
    }

}
